import request from "@/utils/request";

// 查询课程资源列表
export function listCourseCurriCulum(query) {
  return request({
    url: "/project/courseCurriCulum/list",
    method: "get",
    params: query,
  });
}

// 查询课程资源详细
export function getCourseCurriCulum(id) {
  return request({
    url: "/project/courseCurriCulum/" + id,
    method: "get",
  });
}

// 新增课程资源
export function addCourseCurriCulum(data) {
  return request({
    url: "/project/courseCurriCulum",
    method: "post",
    data: data,
  });
}

// 修改课程资源
export function updateCourseCurriCulum(data) {
  return request({
    url: "/project/courseCurriCulum",
    method: "put",
    data: data,
  });
}

// 删除课程资源
export function delCourseCurriCulum(id) {
  return request({
    url: "/project/courseCurriCulum/" + id,
    method: "delete",
  });
}

// 配置章节
export function configChapter(data) {
  return request({
    url: "/project/courseCurriCulum/config",
    method: "post",
    data: data,
  });
}
